package com.papercutting.platform.dto.request;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 微信登录请求
 */
@Data
public class WechatLoginRequest implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 微信授权码
     */
    @NotBlank(message = "授权码不能为空")
    private String code;
    
    /**
     * 微信用户信息
     */
    @Valid
    private WechatUserInfo userInfo;
    
    @Data
    public static class WechatUserInfo implements Serializable {
        private String nickname;
        private String avatarUrl;
        private Integer gender;
        private String country;
        private String province;
        private String city;
        private String language;
    }
}